<?php

?>
<div style="margin: 5px; text-align:left; border: 1px solid #E6DB55;background-color: #FFFFE0; color: #000000; padding: 10px; display:block;">

  <div style="display:table;">

    <div style="position:relative;float:left;padding:5px;width:300px;">
      <b>
        <input type="checkbox" onchange="view_wpud_fields(this)" style="cursor:pointer;">&nbsp;<?php _e("Add fields of WP User Data", "wpresp"); ?>
      </b>:&nbsp;
    </div>

    <div id="div_wpud_sel_modules" style="position: absolute; float: left; margin-top: 30px; margin-left: 20px; display: none; width: 270px;">
      <div>
        <select size="1" onchange="view_wpud_modules(this)" style="width: 200px;">
        	<option value=""><?php _e("Choose a Module", "wpud"); ?></option>
        	<?php
        	$modules = wpud_get_availables_data();
        	foreach ($modules as $module)
        	{
        		$fields = wpud_get_availables_data($module);
        		if ($fields and is_array($fields))
        		{
        			?>
        	    <option value="<?php echo $module ?>"><?php echo wpud_get_alias($module); ?></option>
        	    <?php
        		}
        	}
        	?>
        </select>
      </div>
      <div style="width: 250px;">
        <small>
          <?php _e("Use this feature if the file you are importing have any other users besides 'name' and 'email'.", "wpud"); ?>
        </small>
      </div>
    </div>

    <div id="wpud_list_fields" style="display: none; position: relative; float: left;">
      <div id="div_wpud_modules" style="width: 460px; padding: 5px;">
      <?php
      $modules = wpud_get_availables_data();
      if ($modules and is_array($modules))
      {
      	?>
        <div id="div_wpud_module_empty" style="display: block; border: 1px solid #797979; width: 450px; height: 100px; overflow: auto; background-color: #F2F2F2; padding: 5px;">
          <small>
            &nbsp;<?php _e("Enabling WP User Data modules you can integrate your WordPress subscribers database with plugin users database.", "wpud"); ?>
            &nbsp;<?php _e("The e-mail user will be the reference and any data imported or update will be available to any blog application using the 'user_meta' feature WordPress.", "wpud"); ?>
            &nbsp;<?php _e("Allows geolocation by IP, importing and exporting data, mail merge for mailing lists, sending birthday messages and many other features.", "wpud"); ?>
          </small>
        </div>
      	<?php
      	foreach ($modules as $module)
        {
      		?>
          <div id="div_wpud_module_<?php echo $module; ?>" style="display: none; border: 1px solid #797979; width: 450px; height: 100px; overflow: auto; background-color: #F2F2F2; padding: 5px;">
            <div style="color: #BC0000;">
              <b>
                <?php _e("Module", "wpud"); ?>: <?php echo wpud_get_alias($module); ?>
              </b>
            </div>
            <div style="height: 10px;">
            </div>
          <form name="form_wpud_<?php echo $module; ?>">
          <?php
          $fields = wpud_get_availables_data($module);
          if ($fields and is_array($fields))
          {
      	    foreach ($fields as $field)
      	    {
      		    ?>
              <div id="div_wpud_<?php echo $module; ?>_<?php echo $field; ?>">
                &nbsp;&nbsp;<input id="input_wpud_<?php echo $module; ?>_<?php echo $field; ?>" name="input_wpud_<?php echo $module; ?>" type="checkbox" onchange="wpud_update_field(this)" style="cursor: pointer;">
                &nbsp;
                <small>
                  <span id="span_wpud_<?php echo $module; ?>_<?php echo $field; ?>">
                    <?php echo wpud_get_alias($field); ?>
                  </span>
                  &nbsp;[<?php echo $field; ?>]
                </small>
              </div>
      		    <?php
      	    }
          }
          ?>
          </form>
          </div>
        <?php
    	  }
      }
      ?>
      </div>
    </div>

  </div>

</div>

<?php



?>
